﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Activities;

namespace Headsight.BPMN2WF.WF.Activities
{
    [Designer(typeof(UserTaskDesigner))]
    public sealed class UserTask : CodeActivity
    {
        [RequiredArgument]
        public InArgument<String> Text { get; set; }

        public InArgument<String> EncodedParameters { get; set; }

        protected override void Execute(CodeActivityContext context)
        {
            var text = Text.Get(context);

            Console.WriteLine("------------------------------------");
            Console.WriteLine("{0}: {1}", GetType().Name, text);
            Console.WriteLine("   Params: {0}", EncodedParameters.Get(context).Replace(Environment.NewLine, ""));
            Console.WriteLine("------------------------------------");
        }
    }
}
